package cn.chinaunicom.sdsi.frm.workflow.traffic;

import cn.chinaunicom.sdsi.frm.base.BaseController;
import net.sf.json.JSONObject;
import org.apache.log4j.Logger;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;

@Controller("trafficController")
@RequestMapping(value = "/users")
public class TrafficController extends BaseController {

	private final Logger log = Logger.getLogger(this.getClass());

	/**
	 * 工作流任务相关的业务逻辑组件
	 */

	/**
	 * 根据分类获得特殊人员列表
	 */
	@RequestMapping("/test")
	@ResponseBody
	public JSONObject getUserMonitorListByType(int page, int rows, int type, String state, String phone) {
		JSONObject test=JSONObject.fromObject("hello:world");
		return test;
	}
	/**
	 * 用户历史轨迹查询
	 */
	@RequestMapping("/location")
	public ModelAndView locationPage() {
		ModelAndView mv = new ModelAndView();
		mv.setViewName("frm/workflow/traffic/ga_dm_d_location");
		mv.addObject("currentId", this.getCurrentSysStaffOrg().getStaffOrgId().toString());
		log.info("跳转到用户历史轨迹查询页面！");
		return mv;
	}

	/**
	 * 热力图
	 */
	@RequestMapping("/hotmap")
	public ModelAndView hotMap() {
		ModelAndView mv = new ModelAndView();
		mv.setViewName("frm/workflow/traffic/hotmap");
		mv.addObject("currentId", this.getCurrentSysStaffOrg().getStaffOrgId().toString());
		log.info("跳转到热力图页面！");
		return mv;
	}

	/**
	 * 用户通话记录查询
	 */
	@RequestMapping("/voice")
	public ModelAndView voicePage() {

		ModelAndView mv = new ModelAndView();
		mv.setViewName("frm/workflow/userlist/ga_dm_d_voice");
		mv.addObject("currentId", this.getCurrentSysStaffOrg().getStaffOrgId().toString());
		log.info("跳转到用户通话记录查询页面！");
		return mv;
	}

	/**
	 * 用户通话记录查询
	 */
	@RequestMapping("/voicechart")
	public ModelAndView voiceChartPage() {

		ModelAndView mv = new ModelAndView();
		mv.setViewName("frm/workflow/userlist/ga_dm_s_voice");
		mv.addObject("currentId", this.getCurrentSysStaffOrg().getStaffOrgId().toString());
		log.info("跳转到用户通话记录查询页面！");
		return mv;
	}

	/**
	 * 用户短信记录查询
	 */
	@RequestMapping("/sms")
	public ModelAndView smsPage() {

		ModelAndView mv = new ModelAndView();
		mv.setViewName("frm/workflow/userlist/ga_dm_d_sms");
		mv.addObject("currentId", this.getCurrentSysStaffOrg().getStaffOrgId().toString());
		log.info("跳转到用户短信记录查询页面！");
		return mv;
	}

	/**
	 * 用户上网记录查询
	 */
	@RequestMapping("/netlog")
	public ModelAndView netlogPage() {

		ModelAndView mv = new ModelAndView();
		mv.setViewName("frm/workflow/userlist/ga_dm_d_netlog");
		mv.addObject("currentId", this.getCurrentSysStaffOrg().getStaffOrgId().toString());
		log.info("跳转到用户上网记录查询页面！");
		return mv;
	}
	/**
	 * 用户上网记录查询
	 */
	@RequestMapping("/template")
	public ModelAndView templatePage() {

		ModelAndView mv = new ModelAndView();
		mv.setViewName("frm/workflow/userlist/template");
		mv.addObject("currentId", this.getCurrentSysStaffOrg().getStaffOrgId().toString());
		log.info("跳转到工作流已办基础页面！");
		return mv;
	}
}
